@charset "utf-8";

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    border: none;
    transition: all 0.2s ease-out;
}

html, body {
    width: 100%;
}

html {
    height: 100%;
    color: #333;
    background: #FFF;
    font-family: sans-serif;
    font-size: 12pt;
}

body {
    min-height: 100%;
    background: #F8DDFF;
}

.overlay {
    width: 100%;
    height: 100%;
}

.overlay > .wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    padding: 1em;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(64, 0, 64, 0.8);
    visibility: hidden;
    opacity: 0;
}

.overlay.show > .wrapper {
    visibility: visible;
    opacity: 1;
}

.overlay.show > .overlaid {
    -webkit-filter: blur(4px);
    filter: blur(4px);
}

.overlay > .wrapper > .popup {
    color: #F8E;
    font-size: 2rem;
    text-shadow: 0 0.05rem 0.1rem #000;
}


main {
    margin-top: 1rem;
    margin-bottom: 5rem;
    display: flex;
    justify-content: center;
}

main > section {
    width: 50rem;
    padding: 0 2rem;
}


header {
    height: 3rem;
    width: 100%;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;

    position: fixed;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;

    color: #B0A;
    background: #706;
    box-shadow: 0 0.1rem 0.1rem #502;
}

nav > .wrapper {
    display: flex;
    width: 50rem;
    height: 100%;
}

nav > .wrapper > * {
    display: flex;
    height: 100%;
    align-items: center;
}

nav > .wrapper > .logo {
    font-size: 1.5em;
    padding: 0 1rem;
    color: #DAD;
}

nav > .wrapper > .links {
    flex: 1;
    font-size: 1.2em;
    list-style: none;
}

nav > .wrapper > .links > li {
    padding: 0 0.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    box-shadow: 0 0.1rem 0.1rem transparent;
}

nav > .wrapper > .links > li.active {
    background: #DAD;
    box-shadow: 0 0.1rem 0.1rem #DAD;
}


nav > .wrapper > .profile {
    padding: 0 0.5rem;
    box-shadow: 0 0.1rem 0.1rem transparent;
}

nav > .wrapper > .profile:hover {
    background: #DAD;
    box-shadow: 0 0.1rem 0.1rem #DAD;
}

nav > .wrapper > .profile > div {
    font-size: 1.2em;
    padding: 0 0.5rem;
}

nav > .wrapper > .profile:hover > div {
    font-size: 1.5em;
    padding: 0 0.5rem;
}

nav > .wrapper > .profile > ul {
    visibility: hidden;
    opacity: 0;
    max-width: 0;

    display: flex;
    list-style: none;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1.2em;
    height: 100%;
}

nav > .wrapper > .profile:hover > ul {
    visibility: visible;
    opacity: 1;
    max-width: 10rem;
}

nav > .wrapper > .profile > ul > li {
    padding: 0 0.5rem;

    height: 100%;
    display: flex;
    align-items: center;
}


.overlay > .wrapper > .form {
    display: flex;
    flex-direction: column;
    width: 20rem;

    box-shadow: 0 0 1rem #606;
    border: 0.1rem solid #606;
    border-radius: 0.2rem;
    background: #F8DDFF;
    padding: 1rem;
}

.overlay > .wrapper > .form > *:not(:first-child) {
    margin-top: 0.5rem;
}

.overlay > .wrapper > .form > .title {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    margin: 0.2em 0;
}

.overlay > .wrapper > .form > p {
    font-size: 1rem;
}

.overlay > .wrapper > .form > p:first-child {
    font-size: 1.5rem;
}


.overlay > .wrapper > .form > .actions {
    display: flex;
    justify-content: flex-end;
    text-align: center;
    width: 100%;
    height: 2.5rem;
    opacity: 1;
    visibility: visible;
}

.overlay > .wrapper > .form.busy > .actions {
    height: 0;
    opacity: 0;
    visibility: hidden;
    margin-top: 0;
}

.overlay > .wrapper > .form > .actions > * {
    font-size: 1.2rem;
    min-width: 5em;
    padding: 0 1em;
}

.overlay > .wrapper > .form > .result {
    text-align: center;
    color: #F05;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    margin: 0;
}

.overlay > .wrapper > .form.error:not(.busy) > .result {
    max-height: 1em;
    opacity: 1;
    visibility: visible;
    margin-top: 0.8rem;
}

.overlay > .wrapper > .form > .spinner {
    height: 0;
    opacity: 0;
    visibility: hidden;
    margin: 0;
}

.overlay > .wrapper > .form.busy > .spinner {
    height: 2.5rem;
    opacity: 1;
    visibility: visible;
    margin-top: 0.5rem;
}



/* dashboard page */
.dashboard {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.dashboard > .title {
    font-size: 2rem;
    color: #B0A;
    border-bottom: 0.2rem solid #B0A;
    padding-left: 0.5em;
    margin-bottom: 0.5em;
}

.dashboard > .entry {
    display: flex;
    align-items: baseline;
    margin-left: 2em;
    margin-top: 0.5em;
}

.dashboard > .entry > label {
    font-size: 1.2rem;
    color: #333;
}
.dashboard > .entry > label::after {
    content: "：";
}

.dashboard > .entry > button {
    font-size: 1.5rem;
    color: #000;
}



/* list page */
.list {
    display: flex;
    flex-direction: column;
}

.list > .actions {
    display: flex;
}

.list > .actions > input {
    flex: 1;
    margin-left: 1em;
    margin-right: 1em;
}

.list > .wrapper {
    margin: 1em 0;
    display: flex;
    flex-direction: column;
}

.list > .wrapper > .item {
    min-height: 4em;
    margin: 0.5em 0;
    padding: 1em;
}

.list > .wrapper > .item:hover {
    box-shadow: 0 0.05rem 0.2rem #B0A;
}

.list > .spinner {
    height: 0;
    opacity: 0;
    visibility: hidden;
}

.list.busy > .spinner {
    height: 2.5rem;
    opacity: 1;
    visibility: visible;
}

.list > .more {
    opacity: 1;
    visibility: visible;
    max-height: 3em;
}

.list.busy > .more {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
}



/* item-user */
.item-user {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.item-user > .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: flex-start;
}

.item-user > .profile > .name {
    font-size: 1.5em;
}

.item-user > .profile > .username {
    font-size: 1.2em;
    margin-top: 0.2em;
}

.item-user > .side {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.item-user > .side > .phone {
    font-size: 1.2em;
    margin-right: 0.2em;
    margin-bottom: 0.2em;
}

.item-user > .side > button {
    font-size: 1.1em;
    width: 100%;
    text-align: right;
}



/* item news */
.item-news {
    display: flex;
    align-items: flex-end;
}

.item-news > .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.item-news > .main > .date {
    margin-bottom: 0.5em;
}

.item-news > .main > .body {
    font-size: 1.2em;
}

.item-news > .side {
    display: flex;
    flex-direction: column;
    margin-left: 0.5em;
    min-width: 6em;
}

.item-news > .side > button {
    font-size: 1.1em;
}



/* item auto */
.item-auto {
    display: flex;
    align-items: flex-end;
}

.item-auto > .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.item-auto > .main > .name {
    margin-bottom: 0.5em;
    font-size: 1.2em;
}

.item-auto > .main > .description {
    font-size: 1em;
}

.item-auto > .side {
    display: flex;
    flex-direction: column;
    margin-left: 0.5em;
    min-width: 6em;
}

.item-auto > .side > .price {
    font-size: 1.2em;
    text-align: right;
    margin-right: 1rem;
    margin-left: 0.5rem;
}

.item-auto > .side > .price.unavailable {
    text-decoration: line-through;
}

.item-auto > .side > .price::before {
    content: "￥";
    font-size: 1.2em;
}

.item-auto > .side > .price::after {
    content: "/日";
    font-size: 0.8em;
}

.item-auto > .side > button {
    font-size: 1.1em;
    text-align: right;
}



/* item auto */
.item-order {
    display: flex;
    align-items: flex-end;
}

.item-order.delivered {
    color: #333;
}

.item-order.returned,
.item-order.canceled {
    color: #888;
    font-size: 0.8em;
}

.item-order > .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.item-order > .main > * {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.item-order > .main > .orderer {
    margin-bottom: 0.5em;
    font-size: 1em;
}
.item-order.fresh > .main > .orderer {
    color: #B0A;
}

.item-order > .main > .phone {
    font-size: 1.2em;
    margin-bottom: 0.3em;
    padding-bottom: 0.2em;
    border-bottom: 0.1rem dashed;
}
.item-order.fresh > .main > .phone {
    color: #B0A;
    border-bottom-color: #B0A;
}
.item-order.delivered > .main > .orderer {
    border-bottom-color: #333;
}
.item-order.returned > .main > .orderer,
.item-order.canceled > .main > .orderer {
    border-bottom-color: #888;
}

.item-order > .main > .name {
    margin-bottom: 0.5em;
    font-size: 1.2em;
}

.item-order > .main > .description {
    font-size: 1em;
}

.item-order > .side {
    display: flex;
    flex-direction: column;
    margin-left: 0.5em;
    min-width: 6em;
}

.item-order > .side > .price {
    font-size: 1.2em;
    text-align: right;
    margin-right: 1rem;
    margin-left: 0.5rem;
    margin-bottom: 0.5rem;
}

.item-order > .side > .price::before {
    content: "￥";
    font-size: 1.2em;
}

.item-order > .side > .price::after {
    content: "/日";
    font-size: 0.8em;
}

.item-order > .side > .state {
    text-align: right;
    margin-right: 1rem;
    font-size: 0.8em;
}

.item-order:not(.fresh) > .side > .state {
    max-height: 1em;
    margin-bottom: 0.5rem;
}

.item-order.fresh > .side > .state {
    max-height: 0;
    margin-bottom: 0;
}

.item-order.delivered > .side > .state::before {
    content: "已租出";
}

.item-order.returned > .side > .state::before {
    content: "已归还";
}

.item-order.canceled > .side > .state::before {
    content: "已取消";
}

.item-order > .side > button {
    font-size: 1.1em;
    text-align: right;
    max-height: 3em;
}

.item-order:not(.fresh) > .side > button.deliver,
.item-order:not(.delivered) > .side > button.return,
.item-order:not(.fresh) > .side > button.cancel {
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}



/* item feedback */
.item-feedback {
    display: flex;
    align-items: flex-end;
}

.item-feedback > .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.item-feedback > .main > .who {
    margin-bottom: 0.5em;
}

.item-feedback > .main > .body {
    margin-bottom: 0.5em;
    font-size: 1.2em;
}

.item-feedback > .main > .reply {
    font-size: 1.2em;
    border-left: 0.2rem solid #B0A;
    padding-left: 0.5em;
}

.item-feedback > .main > .reply::before {
    content: "回复：";
    font-size: 1rem;
}

.item-feedback > .main > .reply.hide {
    opacity: 0;
    visibility: hidden;
}

.item-feedback > .side {
    display: flex;
    flex-direction: column;
    margin-left: 0.5em;
    min-width: 6em;
}

.item-feedback > .side > button {
    font-size: 1.1em;
}



/* spinner */
.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 2.5rem;
}

.spinner > .spinning {
    width: 2rem;
    height: 2rem;
    border-radius: 1rem;
    border: 0.2rem solid #B0A;
}



/* inputs */
button, input, button.checkbox {
    font-size: 1.2rem;
}

input {
    height: 2em;
    font-size: 1.2rem;
    padding: 0 0.5em;

    background: #FEF;
    border: 0.1rem solid #BAB;
    color: #515;
    border-radius: 0.2rem;
}

input:focus {
    padding-left: 1em;
    background: #FFF;
    border-color: #A7A;
}



/* button */
button,
input[type="button"],
input[type="submit"] {
    padding: 0.4em 1em;

    background: transparent;
    cursor: pointer;
    color: #333;

    border: none;
    border-radius: 0;
}

button.action,
input[type="submit"] {
    color: #B0A;
}


button[disabled],
input[type="button"][disabled],
input[type="submit"][disabled] {
    cursor: default;
    color: #888;
}

button[disabled]:not(.checkbox),
input[type="button"][disabled],
input[type="submit"][disabled] {
    font-size: 1em;
}


button:not([disabled]):not(:active):hover,
button:focus,
input[type="button"]:not([disabled]):not(:active):hover,
input[type="button"]:focus {
    background: rgba(0,0,0,0.1);
}

button.action:not([disabled]):not(:active):hover,
button.action:focus,
input[type="submit"]:not([disabled]):not(:active):hover,
input[type="submit"]:focus {
    background: rgba(255,0,128,0.1);
    color: #C0B;
}


button:active,
input[type="button"]:active {
    background: rgba(0,0,0,0.2);
}

button.action:active,
input[type="submit"]:active {
    background: rgba(255,0,128,0.2);
    color: #A09;
}



/* checkbox */
button.checkbox {
    display: flex;
    align-items: center;

    height: 2em;
    padding: 0;

    background: transparent;
    color: #515;
    border-radius: 0.2rem;
    cursor: pointer;
}
button.checkbox[disabled] {
    cursor: default;
}

button.checkbox:focus,
button.checkbox:not([disabled]):not(:active):hover {
    background: #FFF;
}

button.checkbox:active {
    background: #FEF;
}


button.checkbox::before {
    content: "";
    height: 0.6em;
    width: 0.6em;
    margin: 0 0.5em;

    border: 0.1em solid #515;
    background: transparent;
    border-radius: 0.2rem;
}

button.checkbox.checked::before {
    background: #515;
}

button.checkbox.checked:active::before {
    background: #848;
}

button.checkbox:active::before {
    background: #DAD;
}



/* link */
.link {
    color: #B0A;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.link:hover {
    color: #C0B;
}

.link:active {
    color: #A09;
}



/* animations */
.slide-left {
    visibility: hidden;
    opacity: 0;
    transform: translateX(4rem);
}

.slide-up {
    visibility: hidden;
    opacity: 0;
    transform: translateY(1rem);
}



/* misc */
.outlined {
    border-radius: 0.2rem;
    border: 0.1rem solid #B0A;
    min-height: 2em;
    background: #FFF;
}

code, .code {
    font-family: monospace;
}

.normal-cursor {
    cursor: default;
}
